package com.lingkang.sales.controller;

import com.lingkang.sales.data.dto.ResponseResult;
import com.lingkang.sales.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("user")
public class UserController {

  @Autowired
  private UserService userService;

  @GetMapping("menu")
  @ResponseBody
  public ResponseResult menu(){
    return userService.getMenu();
  }

  @GetMapping(value = {"","index"})
  public String index(){
    return "user/index";
  }

}
